output1__array := ["a-phone", "b-phone", "a-pad"]  # JSON expression for array

output2__object := {                               # JSON expression for object
    "x-1": "a-phone",
    "x-2": "b-phone",
    "y-1": "a-pad"
}

output3__envoy_request := {                        # More complex JSON expressions
    "attributes": {
        "request": {
        "http": {
            "id": "1034715207896934491",
            "method": "POST",
            "path": "/catalog/products"
        }
        }
    },
    "parsed_body": {
        "items": [
        { "id": "a-phone", "price": 2000 },
        { "id": "b-phone", "price": 800 }
        ]
    }
}

output4__set := {"a-phone", "b-phone", "a-pad"}    # Rego set enumeration expression

output5__arbitrary_rego_expr := {                  # More complex Rego expression: set of...
    abs(-100*2 + 3),                                   # a number
    {"key": 100},                                      # an object
    output1__array,                                    # the value of a variable (array here)
    [output2__object, output4__set]                    # an array of of other hierarchical data
}   # Note: This formatting of the expression being assignned to the output variable sometimes
    # gets confused for a condition {}-block.
    # The := assignment operator makes clear this is not the condition block.

# As usual, a condition block may be attached to the assignment to make it conditional
output6__conditional := {"a-phone", "b-phone", "a-pad"} if {
    true
}
